#pragma once

#include "SoundFile.h"
#include "portaudio.h"
#include "BDString.h"

class VoicePlayerImp
{
	
public:
	VoicePlayerImp();
	~VoicePlayerImp();

	void Play(BDString path);

	void Stop();

private:

	SoundFile* m_pFile;

	PaStreamParameters m_OutputParameters;

	PaStream* m_Stream;

	void Play();

	static int PaStreamCallback(
		const void *input, void *output,
		unsigned long frameCount,
		const PaStreamCallbackTimeInfo* timeInfo,
		PaStreamCallbackFlags statusFlags,
		void *userData);

	static void PaStreamFinishedCallback(void *userData);
	
};

